from django.conf.urls.defaults import *
from django.contrib.auth.views import login, logout

urlpatterns = patterns('',
    # Example:
    # (r'^mysite/', include('mysite.foo.urls')),
	#(r'^accounts/login/$',  login),
    #(r'^accounts/logout/$', logout),
	
	(r'^site-media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': '/home/tyler/media'}),
	(r'^new-series/$', 'mysite.g_novel.views.new_series'),
	(r'^new-issue/$', 'mysite.g_novel.views.new_issue'),
	(r'^new-page/$', 'mysite.g_novel.views.new_page'),
	(r'^search/$',     'mysite.g_novel.views.search'),
	(r'^$', 'mysite.g_novel.views.home'),
	(r'home/', 'mysite.g_novel.views.home'),
	(r'ajax/next-image/(?P<series_name>\w+)/(?P<issue_name>[\w% _]+)/(?P<panel_number>\d+)/$', 'mysite.g_novel.views.next_image'),
	
    # Uncomment this for admin:
    (r'^admin/', include('django.contrib.admin.urls')),
	#(r'/', 'mysite.g_novel.views.root'),
	(r'^(?P<series_name>\w+)/$','mysite.g_novel.views.view_series'),
	(r'^(?P<series_name>\w+)/(?P<issue_name>[\w% _]+)/$', 'mysite.g_novel.views.view_issue'),
	(r'^(?P<series_name>\w+)/(?P<issue_name>\w+)/(?P<page_number>\d+)/$', 'mysite.g_novel.views.view_page'),
)
